#include <iostream>
using namespace std;

int main() {
//    int n=0;
    string pandromeStr;
    bool isPandrome;
    char isContinue;

    while(true) {
        isPandrome=true;
//        cout << "Enter your number of the pandrome:";
//        cin >> n;
        //    cout << n << endl;
        cout << "Enter pandrome:";
        cin >> pandromeStr;
        //    cout << pandromeStr << endl;
        int len=pandromeStr.length();
//        if(len != n) {
//            cout << "Error:the number and the length of pandrome string is not equal" << endl;
////            return -1;
//            continue;
//        }

        for(int i=0; i<len/2; ++i) {
            if(pandromeStr[i]!=pandromeStr[len-1-i]) {
                isPandrome = false;
            }
        }

        if(isPandrome) {
            cout << "TRUE Pandrome" << endl;
        } else {
            cout << "FALSE Pandrome" << endl;
        }

        cout << "continue:Y/N:";
        cin >> isContinue;
        if(toupper(isContinue)!='Y') {
            cout << "退出成功" << endl;
            break;
        }
    }

    return 0;
}
